
FLAGS=
GAE=/usr/local/google_appengine
GAEPATH=$(GAE)
APPPATH=app
TESTS=`find app -name [a-z]\*_test.py`
PYPORT=8087
JSPORT=9087
ADDRESS=localhost
PYTHON=python -Wignore
BINDIR=scripts
JSLIB=jslib
.PHONY=serve debug python python_raw clean serve_js

serve:
	$(GAE)/dev_appserver.py app --port $(PYPORT) --address $(ADDRESS) 

debug:
	$(GAE)/dev_appserver.py app --port $(PYPORT) --address $(ADDRESS) --debug

python:
	PYTHONPATH=$(GAEPATH):$(APPPATH) $(PYTHON) -i startup.py

python_raw:
	PYTHONPATH=$(GAEPATH):$(APPPATH) $(PYTHON)

$(BINDIR)/plovr.jar:
	curl -L http://plovr.googlecode.com/files/plovr-0744c5209a34.jar > $(BINDIR)/plovr.jar

serve_js: $(BINDIR)/plovr.jar
	java -jar $(BINDIR)/plovr.jar serve --port $(JSPORT) $(JSLIB)/config.js

clean:
	rm -f `find . -name \*.pyc -o -name \*~ -o -name @* -o -name \*.orig`